package arquiteturaTAK;

public class Register {
	private boolean[] value;
	
	public Register(int tamWord){
		value = new boolean[tamWord];
		for(int i=0; i<tamWord; i++){
			value[i] = false;
		}
	}	
	
	public boolean setValue(boolean[] value){
		if(this.value.length != value.length){
			return false;
		}
		
		this.value = value;
		
		return true;
	}
	
	public boolean[] getValue(){
		return this.value;
	}
	
	public String stringValue(){
		String result="";
		for(int i=0; i<value.length; i++){
			if(value[i]==true){
				result += "1";
			} else{
				result += "0";
			}
		}
		return result;
	}
}
